#ifndef DIRECTORY_H
#define DIRECTORY_H

#include <iostream>
#include <cstdlib>
#include <string>

extern "C"
{
	#include <dirent.h>
}


class Directory
{
	protected:

	DIR* _dir;
	std::string _path;


	public:

	Directory(const std::string& path);
	Directory(Directory& other);
	~Directory();

	std::string getPath();

	bool open();
	void close();

	bool nextFilename(std::string& filename);
	void rewind();

	Directory& operator=(const Directory& other);


	static void create(std::string dir);
	static std::string getDirFile(std::string file);
};


#endif


